const service = require("../server/index");

const getVisit = async (id_app,start,end) => {
  let res = await service.get(
    "https://tongji-api.dcloud.net.cn/uni/stat/api/visit/trend",
    {
      params: {
        id_app,
        p: 0,
        compare: 0,
        start,
        end,
        item: "num_page_views"
      },
    }
  );
  return res;
};

module.exports = getVisit;
